{extend name="public/father" /}

{block name="main"}
<style>
    .layui-form-pane .layui-form-text{padding: 0 10px;}
    .layui-form-pane .layui-form-label{background: none !important;padding-left: 2px;border: 0;color:#000;}
    .layui-form-pane .layui-form-text input, .layui-form-pane .layui-form-text textarea{border-radius: 3px !important;}
</style>

<div class="layui-card">
    <div class="layui-card-body">

        <blockquote class="layui-elem-quote layui-quote-nm">
            <p>标题中可以加入{city} 代表所在城市，{emoji} 代表随机表情</p>
        </blockquote>

        <form class="layui-form layui-form-pane" method="post" style="margin-top: 10px;">

            <div class="layui-form-item layui-form-text">
                <label class="layui-form-label">所属用户</label>
                <div class="layui-input-block">
                    <select name="uid" lay-verify="required">
                        {foreach $users as $v}
                        <option value="{$v.id}">{$v.username}</option>
                        {/foreach}
                    </select>
                </div>
            </div>

            <div class="layui-form-item layui-form-text">
                <label class="layui-form-label">群标题</label>
                <div class="layui-input-block">
                    <input type="text" name="title" placeholder="群标题" required lay-verify="required" autocomplete="off" class="layui-input">
                </div>
            </div>

            <div class="layui-form-item layui-form-text">
                <label class="layui-form-label">分享标题</label>
                <div class="layui-input-block">
                    <input type="text" name="share_title" placeholder="分享标题" required lay-verify="required" autocomplete="off" class="layui-input">
                </div>
            </div>

            <div class="layui-form-item layui-form-text">
                <label class="layui-form-label">分享描述</label>
                <div class="layui-input-block">
                    <input type="text" name="share_desc" placeholder="分享描述" required lay-verify="required" autocomplete="off" class="layui-input">
                </div>
            </div>

	        <div class="layui-form-item layui-form-text upload">
		        <label class="layui-form-label">分享图标</label>
		        <div class="layui-input-block">
			        <input type="text" name="share_img" value="" required lay-verify="required" placeholder="上传图标" autocomplete="off" class="layui-input upload-input">
			        <div style="position: absolute;right: 0px;top: 0px;">
				        <img class="upload-img" src="" style="max-height: 36px;" onclick="showImg(this.src);"><button type="button" class="layui-btn layui-btn-primary upload-button"><i class="layui-icon layui-icon-upload"></i>上传图片</button>
			        </div>
		        </div>
	        </div>

            <div class="layui-form-item layui-form-text">
                <label class="layui-form-label">群头像</label>
                <div class="layui-input-block">
                    <input type="radio" name="touxiang" lay-filter="touxiang" value="__STATIC__/img/touxiang01.jpg" title="<img src='__STATIC__/img/touxiang01.jpg' style='width:50px;'>" checked>
                    <input type="radio" name="touxiang" lay-filter="touxiang" value="__STATIC__/img/touxiang02.jpg" title="<img src='__STATIC__/img/touxiang02.jpg' style='width:50px;'>">
                    <input type="radio" name="touxiang" lay-filter="touxiang" value="__STATIC__/img/touxiang03.jpg" title="<img src='__STATIC__/img/touxiang03.jpg' style='width:50px;'>">
                    <input type="radio" name="touxiang" lay-filter="touxiang" value="0" title="上传">
                </div>
            </div>

            <div class="layui-form-item layui-form-text upload" id="shangchuantouxiang" style="display: none;">
                <label class="layui-form-label" style="color: red;">上传头像</label>
                <div class="layui-input-block">
                    <input type="text" name="img" value="__STATIC__/img/touxiang01.jpg" required lay-verify="required" placeholder="上传头像" autocomplete="off" class="layui-input upload-input">
                    <div style="position: absolute;right: 0px;top: 0px;">
                        <img class="upload-img" src="__STATIC__/img/touxiang01.jpg" style="max-height: 36px;" onclick="showImg(this.src);"><button type="button" class="layui-btn layui-btn-primary upload-button"><i class="layui-icon layui-icon-upload"></i>上传图片</button>
                    </div>
                </div>
            </div>

	        <div class="layui-form-item layui-form-text">
		        <label class="layui-form-label">聊天窗口</label>
		        <div class="layui-input-block">
			        <select name="ltck" lay-verify="required">
				        <option value="1">✓ 有聊天窗口</option>
				        <option value="2">✓ 无聊天窗口</option>
			        </select>
		        </div>
	        </div>

            <div class="layui-form-item layui-form-text">
                <label class="layui-form-label">聊天窗口模板</label>
                <div class="layui-input-block">
                    <select name="muban" lay-filter="muban" lay-verify="required">
                        <option value="1">✓ 默认模板</option>
                        <option value="0">✓ 自定义模板</option>
                    </select>
                </div>

                <div class="layui-input-block" id="zidingyi" style="display: none;">

                    <table class="layui-table" lay-even lay-skin="line" style="border-color: #5FB878;border-collapse: inherit;border-radius: 3px;min-width: 700px;">
                        <thead>
                        <tr>
                            <th style="width: 80px;">头像(必填)</th>
                            <th style="width: 80px;">昵称</th>
                            <th style="width: 100px;">类型</th>
                            <th>内容（必填）</th>
                        </tr>
                        </thead>

                        <style>
                            .up-btn{max-width: 60px;height: 50px;border: 1px solid #dddddd;text-align: center;border-radius: 3px;padding: 10px 5px;cursor: pointer;background-color: #fff;background-size:100%;background-repeat:no-repeat;text-shadow: 0px 0px 2px #ffffff;}
                        </style>
                        <tbody>

                        <tr>
                            <td>
                                <div type="button" class="up-btn">
                                    <input type="hidden" name="ico[0]" class="up-input">
                                    <i class="layui-icon">&#xe67c;</i><p>上传头像</p>
                                </div>
                            </td>
                            <td>
                                <input type="text" name="name[0]" placeholder="昵称" class="layui-input">
                            </td>
                            <td>
                                <input type="radio" name="type[0]" value="img" title="图片" checked>
                                <input type="radio" name="type[0]" value="word" title="文字">
                            </td>
                            <td>
                                <div class="upload" style="position: relative;">
                                    <textarea name="url[0]" style="min-height: 76px;" placeholder="上传图片 或 输入文字"  onmouseenter="if (this.value){layer.tips('<p align=center>图片预览</p><img style=\'max-width: 100%;\' src='+this.value+'>', this, {tips: [3, '#5FB878']});}" class="layui-textarea upload-input"></textarea>
                                    <button style="position: absolute;right: 0;bottom: 0px;" type="button" class="layui-btn layui-btn-primary layui-btn-xs upload-button"><i class="layui-icon layui-icon-upload"></i>上传图片</button>
                                </div>
                            </td>
                        </tr>

                        <tr>
                            <td>
                                <div type="button" class="up-btn">
                                    <input type="hidden" name="ico[1]" class="up-input">
                                    <i class="layui-icon">&#xe67c;</i><p>上传头像</p>
                                </div>
                            </td>
                            <td>
                                <input type="text" name="name[1]" placeholder="昵称" class="layui-input">
                            </td>
                            <td>
                                <input type="radio" name="type[1]" value="img" title="图片" checked>
                                <input type="radio" name="type[1]" value="word" title="文字">
                            </td>
                            <td>
                                <div class="upload" style="position: relative;">
                                    <textarea name="url[1]" style="min-height: 76px;" placeholder="上传图片 或 输入文字"  onmouseenter="if (this.value){layer.tips('<p align=center>图片预览</p><img style=\'max-width: 100%;\' src='+this.value+'>', this, {tips: [3, '#5FB878']});}" class="layui-textarea upload-input"></textarea>
                                    <button style="position: absolute;right: 0;bottom: 0px;" type="button" class="layui-btn layui-btn-primary layui-btn-xs upload-button"><i class="layui-icon layui-icon-upload"></i>上传图片</button>
                                </div>
                            </td>
                        </tr>

                        <tr>
                            <td>
                                <div type="button" class="up-btn">
                                    <input type="hidden" name="ico[2]" class="up-input">
                                    <i class="layui-icon">&#xe67c;</i><p>上传头像</p>
                                </div>
                            </td>
                            <td>
                                <input type="text" name="name[2]" placeholder="昵称" class="layui-input">
                            </td>
                            <td>
                                <input type="radio" name="type[2]" value="img" title="图片" checked>
                                <input type="radio" name="type[2]" value="word" title="文字">
                            </td>
                            <td>
                                <div class="upload" style="position: relative;">
                                    <textarea name="url[2]" style="min-height: 76px;" placeholder="上传图片 或 输入文字"  onmouseenter="if (this.value){layer.tips('<p align=center>图片预览</p><img style=\'max-width: 100%;\' src='+this.value+'>', this, {tips: [3, '#5FB878']});}" class="layui-textarea upload-input"></textarea>
                                    <button style="position: absolute;right: 0;bottom: 0px;" type="button" class="layui-btn layui-btn-primary layui-btn-xs upload-button"><i class="layui-icon layui-icon-upload"></i>上传图片</button>
                                </div>
                            </td>
                        </tr>

                        <tr>
                            <td>
                                <div type="button" class="up-btn">
                                    <input type="hidden" name="ico[3]" class="up-input">
                                    <i class="layui-icon">&#xe67c;</i><p>上传头像</p>
                                </div>
                            </td>
                            <td>
                                <input type="text" name="name[3]" placeholder="昵称" class="layui-input">
                            </td>
                            <td>
                                <input type="radio" name="type[3]" value="img" title="图片" checked>
                                <input type="radio" name="type[3]" value="word" title="文字">
                            </td>
                            <td>
                                <div class="upload" style="position: relative;">
                                    <textarea name="url[3]" style="min-height: 76px;" placeholder="上传图片 或 输入文字"  onmouseenter="if (this.value){layer.tips('<p align=center>图片预览</p><img style=\'max-width: 100%;\' src='+this.value+'>', this, {tips: [3, '#5FB878']});}" class="layui-textarea upload-input"></textarea>
                                    <button style="position: absolute;right: 0;bottom: 0px;" type="button" class="layui-btn layui-btn-primary layui-btn-xs upload-button"><i class="layui-icon layui-icon-upload"></i>上传图片</button>
                                </div>
                            </td>
                        </tr>

                        <tr>
                            <td>
                                <div type="button" class="up-btn">
                                    <input type="hidden" name="ico[4]" class="up-input">
                                    <i class="layui-icon">&#xe67c;</i><p>上传头像</p>
                                </div>
                            </td>
                            <td>
                                <input type="text" name="name[4]" placeholder="昵称" class="layui-input">
                            </td>
                            <td>
                                <input type="radio" name="type[4]" value="img" title="图片" checked>
                                <input type="radio" name="type[4]" value="word" title="文字">
                            </td>
                            <td>
                                <div class="upload" style="position: relative;">
                                    <textarea name="url[4]" style="min-height: 76px;" placeholder="上传图片 或 输入文字"  onmouseenter="if (this.value){layer.tips('<p align=center>图片预览</p><img style=\'max-width: 100%;\' src='+this.value+'>', this, {tips: [3, '#5FB878']});}" class="layui-textarea upload-input"></textarea>
                                    <button style="position: absolute;right: 0;bottom: 0px;" type="button" class="layui-btn layui-btn-primary layui-btn-xs upload-button"><i class="layui-icon layui-icon-upload"></i>上传图片</button>
                                </div>
                            </td>
                        </tr>

                        <tr>
                            <td>
                                <div type="button" class="up-btn">
                                    <input type="hidden" name="ico[5]" class="up-input">
                                    <i class="layui-icon">&#xe67c;</i><p>上传头像</p>
                                </div>
                            </td>
                            <td>
                                <input type="text" name="name[5]" placeholder="昵称" class="layui-input">
                            </td>
                            <td>
                                <input type="radio" name="type[5]" value="img" title="图片" checked>
                                <input type="radio" name="type[5]" value="word" title="文字">
                            </td>
                            <td>
                                <div class="upload" style="position: relative;">
                                    <textarea name="url[5]" style="min-height: 76px;" placeholder="上传图片 或 输入文字"  onmouseenter="if (this.value){layer.tips('<p align=center>图片预览</p><img style=\'max-width: 100%;\' src='+this.value+'>', this, {tips: [3, '#5FB878']});}" class="layui-textarea upload-input"></textarea>
                                    <button style="position: absolute;right: 0;bottom: 0px;" type="button" class="layui-btn layui-btn-primary layui-btn-xs upload-button"><i class="layui-icon layui-icon-upload"></i>上传图片</button>
                                </div>
                            </td>
                        </tr>

                        <tr>
                            <td>
                                <div type="button" class="up-btn">
                                    <input type="hidden" name="ico[6]" class="up-input">
                                    <i class="layui-icon">&#xe67c;</i><p>上传头像</p>
                                </div>
                            </td>
                            <td>
                                <input type="text" name="name[6]" placeholder="昵称" class="layui-input">
                            </td>
                            <td>
                                <input type="radio" name="type[6]" value="img" title="图片" checked>
                                <input type="radio" name="type[6]" value="word" title="文字">
                            </td>
                            <td>
                                <div class="upload" style="position: relative;">
                                    <textarea name="url[6]" style="min-height: 76px;" placeholder="上传图片 或 输入文字"  onmouseenter="if (this.value){layer.tips('<p align=center>图片预览</p><img style=\'max-width: 100%;\' src='+this.value+'>', this, {tips: [3, '#5FB878']});}" class="layui-textarea upload-input"></textarea>
                                    <button style="position: absolute;right: 0;bottom: 0px;" type="button" class="layui-btn layui-btn-primary layui-btn-xs upload-button"><i class="layui-icon layui-icon-upload"></i>上传图片</button>
                                </div>
                            </td>
                        </tr>

                        <tr>
                            <td>
                                <div type="button" class="up-btn">
                                    <input type="hidden" name="ico[7]" class="up-input">
                                    <i class="layui-icon">&#xe67c;</i><p>上传头像</p>
                                </div>
                            </td>
                            <td>
                                <input type="text" name="name[7]" placeholder="昵称" class="layui-input">
                            </td>
                            <td>
                                <input type="radio" name="type[7]" value="img" title="图片" checked>
                                <input type="radio" name="type[7]" value="word" title="文字">
                            </td>
                            <td>
                                <div class="upload" style="position: relative;">
                                    <textarea name="url[7]" style="min-height: 76px;" placeholder="上传图片 或 输入文字"  onmouseenter="if (this.value){layer.tips('<p align=center>图片预览</p><img style=\'max-width: 100%;\' src='+this.value+'>', this, {tips: [3, '#5FB878']});}" class="layui-textarea upload-input"></textarea>
                                    <button style="position: absolute;right: 0;bottom: 0px;" type="button" class="layui-btn layui-btn-primary layui-btn-xs upload-button"><i class="layui-icon layui-icon-upload"></i>上传图片</button>
                                </div>
                            </td>
                        </tr>

                        <tr>
                            <td>
                                <div type="button" class="up-btn">
                                    <input type="hidden" name="ico[8]" class="up-input">
                                    <i class="layui-icon">&#xe67c;</i><p>上传头像</p>
                                </div>
                            </td>
                            <td>
                                <input type="text" name="name[8]" placeholder="昵称" class="layui-input">
                            </td>
                            <td>
                                <input type="radio" name="type[8]" value="img" title="图片" checked>
                                <input type="radio" name="type[8]" value="word" title="文字">
                            </td>
                            <td>
                                <div class="upload" style="position: relative;">
                                    <textarea name="url[8]" style="min-height: 76px;" placeholder="上传图片 或 输入文字"  onmouseenter="if (this.value){layer.tips('<p align=center>图片预览</p><img style=\'max-width: 100%;\' src='+this.value+'>', this, {tips: [3, '#5FB878']});}" class="layui-textarea upload-input"></textarea>
                                    <button style="position: absolute;right: 0;bottom: 0px;" type="button" class="layui-btn layui-btn-primary layui-btn-xs upload-button"><i class="layui-icon layui-icon-upload"></i>上传图片</button>
                                </div>
                            </td>
                        </tr>

                        <tr>
                            <td>
                                <div type="button" class="up-btn">
                                    <input type="hidden" name="ico[9]" class="up-input">
                                    <i class="layui-icon">&#xe67c;</i><p>上传头像</p>
                                </div>
                            </td>
                            <td>
                                <input type="text" name="name[9]" placeholder="昵称" class="layui-input">
                            </td>
                            <td>
                                <input type="radio" name="type[9]" value="img" title="图片" checked>
                                <input type="radio" name="type[9]" value="word" title="文字">
                            </td>
                            <td>
                                <div class="upload" style="position: relative;">
                                    <textarea name="url[9]" style="min-height: 76px;" placeholder="上传图片 或 输入文字"  onmouseenter="if (this.value){layer.tips('<p align=center>图片预览</p><img style=\'max-width: 100%;\' src='+this.value+'>', this, {tips: [3, '#5FB878']});}" class="layui-textarea upload-input"></textarea>
                                    <button style="position: absolute;right: 0;bottom: 0px;" type="button" class="layui-btn layui-btn-primary layui-btn-xs upload-button"><i class="layui-icon layui-icon-upload"></i>上传图片</button>
                                </div>
                            </td>
                        </tr>

                        <tr>
                            <td>
                                <div type="button" class="up-btn">
                                    <input type="hidden" name="ico[10]" class="up-input">
                                    <i class="layui-icon">&#xe67c;</i><p>上传头像</p>
                                </div>
                            </td>
                            <td>
                                <input type="text" name="name[10]" placeholder="昵称" class="layui-input">
                            </td>
                            <td>
                                <input type="radio" name="type[10]" value="img" title="图片" checked>
                                <input type="radio" name="type[10]" value="word" title="文字">
                            </td>
                            <td>
                                <div class="upload" style="position: relative;">
                                    <textarea name="url[10]" style="min-height: 76px;" placeholder="上传图片 或 输入文字"  onmouseenter="if (this.value){layer.tips('<p align=center>图片预览</p><img style=\'max-width: 100%;\' src='+this.value+'>', this, {tips: [3, '#5FB878']});}" class="layui-textarea upload-input"></textarea>
                                    <button style="position: absolute;right: 0;bottom: 0px;" type="button" class="layui-btn layui-btn-primary layui-btn-xs upload-button"><i class="layui-icon layui-icon-upload"></i>上传图片</button>
                                </div>
                            </td>
                        </tr>

                        <tr>
                            <td>
                                <div type="button" class="up-btn">
                                    <input type="hidden" name="ico[11]" class="up-input">
                                    <i class="layui-icon">&#xe67c;</i><p>上传头像</p>
                                </div>
                            </td>
                            <td>
                                <input type="text" name="name[11]" placeholder="昵称" class="layui-input">
                            </td>
                            <td>
                                <input type="radio" name="type[11]" value="img" title="图片" checked>
                                <input type="radio" name="type[11]" value="word" title="文字">
                            </td>
                            <td>
                                <div class="upload" style="position: relative;">
                                    <textarea name="url[11]" style="min-height: 76px;" placeholder="上传图片 或 输入文字"  onmouseenter="if (this.value){layer.tips('<p align=center>图片预览</p><img style=\'max-width: 100%;\' src='+this.value+'>', this, {tips: [3, '#5FB878']});}" class="layui-textarea upload-input"></textarea>
                                    <button style="position: absolute;right: 0;bottom: 0px;" type="button" class="layui-btn layui-btn-primary layui-btn-xs upload-button"><i class="layui-icon layui-icon-upload"></i>上传图片</button>
                                </div>
                            </td>
                        </tr>

                        <tr>
                            <td>
                                <div type="button" class="up-btn">
                                    <input type="hidden" name="ico[12]" class="up-input">
                                    <i class="layui-icon">&#xe67c;</i><p>上传头像</p>
                                </div>
                            </td>
                            <td>
                                <input type="text" name="name[12]" placeholder="昵称" class="layui-input">
                            </td>
                            <td>
                                <input type="radio" name="type[12]" value="img" title="图片" checked>
                                <input type="radio" name="type[12]" value="word" title="文字">
                            </td>
                            <td>
                                <div class="upload" style="position: relative;">
                                    <textarea name="url[12]" style="min-height: 76px;" placeholder="上传图片 或 输入文字"  onmouseenter="if (this.value){layer.tips('<p align=center>图片预览</p><img style=\'max-width: 100%;\' src='+this.value+'>', this, {tips: [3, '#5FB878']});}" class="layui-textarea upload-input"></textarea>
                                    <button style="position: absolute;right: 0;bottom: 0px;" type="button" class="layui-btn layui-btn-primary layui-btn-xs upload-button"><i class="layui-icon layui-icon-upload"></i>上传图片</button>
                                </div>
                            </td>
                        </tr>

                        <tr>
                            <td>
                                <div type="button" class="up-btn">
                                    <input type="hidden" name="ico[13]" class="up-input">
                                    <i class="layui-icon">&#xe67c;</i><p>上传头像</p>
                                </div>
                            </td>
                            <td>
                                <input type="text" name="name[13]" placeholder="昵称" class="layui-input">
                            </td>
                            <td>
                                <input type="radio" name="type[13]" value="img" title="图片" checked>
                                <input type="radio" name="type[13]" value="word" title="文字">
                            </td>
                            <td>
                                <div class="upload" style="position: relative;">
                                    <textarea name="url[13]" style="min-height: 76px;" placeholder="上传图片 或 输入文字"  onmouseenter="if (this.value){layer.tips('<p align=center>图片预览</p><img style=\'max-width: 100%;\' src='+this.value+'>', this, {tips: [3, '#5FB878']});}" class="layui-textarea upload-input"></textarea>
                                    <button style="position: absolute;right: 0;bottom: 0px;" type="button" class="layui-btn layui-btn-primary layui-btn-xs upload-button"><i class="layui-icon layui-icon-upload"></i>上传图片</button>
                                </div>
                            </td>
                        </tr>

                        <tr>
                            <td>
                                <div type="button" class="up-btn">
                                    <input type="hidden" name="ico[14]" class="up-input">
                                    <i class="layui-icon">&#xe67c;</i><p>上传头像</p>
                                </div>
                            </td>
                            <td>
                                <input type="text" name="name[14]" placeholder="昵称" class="layui-input">
                            </td>
                            <td>
                                <input type="radio" name="type[14]" value="img" title="图片" checked>
                                <input type="radio" name="type[14]" value="word" title="文字">
                            </td>
                            <td>
                                <div class="upload" style="position: relative;">
                                    <textarea name="url[14]" style="min-height: 76px;" placeholder="上传图片 或 输入文字"  onmouseenter="if (this.value){layer.tips('<p align=center>图片预览</p><img style=\'max-width: 100%;\' src='+this.value+'>', this, {tips: [3, '#5FB878']});}" class="layui-textarea upload-input"></textarea>
                                    <button style="position: absolute;right: 0;bottom: 0px;" type="button" class="layui-btn layui-btn-primary layui-btn-xs upload-button"><i class="layui-icon layui-icon-upload"></i>上传图片</button>
                                </div>
                            </td>
                        </tr>

                        <tr>
                            <td>
                                <div type="button" class="up-btn">
                                    <input type="hidden" name="ico[15]" class="up-input">
                                    <i class="layui-icon">&#xe67c;</i><p>上传头像</p>
                                </div>
                            </td>
                            <td>
                                <input type="text" name="name[15]" placeholder="昵称" class="layui-input">
                            </td>
                            <td>
                                <input type="radio" name="type[15]" value="img" title="图片" checked>
                                <input type="radio" name="type[15]" value="word" title="文字">
                            </td>
                            <td>
                                <div class="upload" style="position: relative;">
                                    <textarea name="url[15]" style="min-height: 76px;" placeholder="上传图片 或 输入文字"  onmouseenter="if (this.value){layer.tips('<p align=center>图片预览</p><img style=\'max-width: 100%;\' src='+this.value+'>', this, {tips: [3, '#5FB878']});}" class="layui-textarea upload-input"></textarea>
                                    <button style="position: absolute;right: 0;bottom: 0px;" type="button" class="layui-btn layui-btn-primary layui-btn-xs upload-button"><i class="layui-icon layui-icon-upload"></i>上传图片</button>
                                </div>
                            </td>
                        </tr>

                        </tbody>
                    </table>


                </div>
            </div>

            <div class="layui-form-item layui-form-text">
                <label class="layui-form-label">返回广告链接</label>
                <div class="layui-input-block">
                    <input type="text" name="back_jump_url" placeholder="http:// 或者 https://开头" required lay-verify="required" autocomplete="off" class="layui-input">
                </div>
            </div>


            <div class="layui-form-item layui-form-text">
                <label class="layui-form-label">分享结束后</label>
                <div class="layui-input-block">
                    <input type="radio" name="share_end_type" lay-filter="share_end_type" value="1" title="跳转到指定链接" checked>
                    <input type="radio" name="share_end_type" lay-filter="share_end_type" value="2" title="弹出二维码">
                </div>
            </div>


            <div class="layui-form-item layui-form-text share_end_type_1">
                <label class="layui-form-label">分享结束跳转链接</label>
                <div class="layui-input-block">
                    <input type="text" name="share_end_url" placeholder="http:// 或者 https://开头" autocomplete="off" class="layui-input">
                </div>
            </div>


            <div class="layui-form-item layui-form-text upload share_end_type_2" style="display: none;">
                <label class="layui-form-label">分享结束弹出二维码（每行一个）</label>
                <div class="layui-input-block">
                    <textarea name="qrcode" placeholder="每行一个二维码图片链接" class="layui-textarea upload-textarea"></textarea>
                    <button type="button" class="layui-btn layui-btn-primary upload-button" style="position: absolute;right: 0px;bottom: 0px;"><i class="layui-icon layui-icon-upload"></i> 上传图片</button>
                </div>
            </div>

            <div class="layui-form-item layui-form-text">
                <label class="layui-form-label">访问量</label>
                <div class="layui-input-block">
                    <input type="text" name="view" value="0" required lay-verify="number" autocomplete="off" class="layui-input">
                </div>
            </div>

            <div class="layui-form-item">
                <div class="layui-input-block">
                    <button class="layui-btn" lay-submit lay-filter="create">立即保存</button>
                </div>
            </div>
        </form>

    </div>
</div>
{/block}

{block name="js"}
<script>
    layui.use(['form'], function(){
        var form = layui.form;

        form.on('radio(share_end_type)', function (data) {
            if ( data.value == 1 ){
                $('.share_end_type_1').show();
                $('.share_end_type_2').hide();
            } else {
                $('.share_end_type_2').show();
                $('.share_end_type_1').hide();
            }
        });

        form.on('radio(touxiang)', function (data) {
            var touxiang = data.value;
            if ( touxiang == 0 ){
                $('#shangchuantouxiang').show();
            } else {
                $('#shangchuantouxiang').hide();
                $('#shangchuantouxiang .upload-input').val(touxiang);
                $('#shangchuantouxiang .upload-img').attr('src', touxiang);
                layer.msg('查看图片<br><img src="'+touxiang+'" width="100"><br>2秒后自动关闭', {time:2000});
            }
        });

        form.on('select(muban)', function (data){
            var zidingyi = data.value;
            if ( zidingyi == '0' ){
                //点选了 自定义模板
                $('#zidingyi').show();
            }else{
                $('#zidingyi').hide();
            }
        });

    });

</script>
{/block}
